package com.lingchen.boot.gof.factory;

/**
 * Created by lc on 2020/6/24
 */
public class ProductFactory {

    public static Product getBean(String name){
        if (name.equals("moblie")){
            return new Mobile();
        }else if (name.equals("car")){
            return new Car();
        }

        return null;
    }
}
